package test3;

import test3.ink.Ink;
import lombok.Data;
import test3.paper.Paper;

@Data

public class Printer {
    private Ink ink;
    private Paper paper;
    public void print(String str){
        System.out.println("使用的打印机颜色是:"+ink.getColor());
        int lineSize=paper.getLineSize();
        for (int i = 0; i < str.length(); i++) {
            System.out.print(str.charAt(i));
            if((i+1)%lineSize==0){
                System.out.println();
            }
        }
    }
}
